#include <stdio.h>
int main()
{
     int a,n,i;
     n=0;
     scanf("%d",&a);
     while(a!=0)
     {
     if(a%2==0)
     {
     	n=n+1; 
	 }
	 a=a/2;
	 } 
	 printf("%d",n);
	 return 0;
 } 
